#pragma once
#include "DeviceBase.h"

namespace RobotPlant { namespace RobotProxy{
	using namespace std;
	using namespace boost::join;
	using namespace RobotPlant::Common;

	struct BMP
	{
	  unsigned char *Data;
	  int Size;
	};


	/*
	The Camera Device enables you to obtain data from a conventional camera.
	*/
	class RP_ROBOTPROXY_API CameraDevice : public DeviceBase
	{
	protected:

	public:
		/*
		Constructor
		*/
		CameraDevice(RobotInstance* pParent,joint::spawn_type e=0);

		~CameraDevice();

		synch<std::vector<int>,void> GetImageSize;

		synch<double,void> GetViewAngle;

		synch<double,void> GetQuality;

		synch<BMP,void> GetLastFrame;

		synch<time_t,void> GetLastTimeStamp;

	protected:
		std::vector<int> Handler_GetImageSize(void_t);

		double Handler_GetViewAngle(void_t);

		double Handler_GetQuality(void_t);

		BMP Handler_GetLastFrame(void_t);

		time_t Handler_GetLastTimeStamp(void_t);
	};
}}
